package com.jung.news.model;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "news")
public class News {
	
public News(){
		
	}
private int id;
private String title;
private String content;
private Date publishTime;

@Id
@GeneratedValue(strategy = IDENTITY)
@Column(name = "id", unique = true, nullable = false)
public int getId() {
	return id;
}
public void setId(int id) {
	this.id = id;
}
@Column(name = "title",length =120)
public String getTitle() {
	return title;
}
public void setTitle(String title) {
	this.title = title;
}
@Column(name = "content")
public String getContent() {
	return content;
}
public void setContent(String content) {
	this.content = content;
}
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "publishTime", length = 0)
public Date getPublishTime() {
	return publishTime;
}
public void setPublishTime(Date publishTime) {
	this.publishTime = publishTime;
}


}
